package org.example.ioc.pro5_ipc_import;

import org.example.ioc.pro5_ipc_import.other.Banana;
import org.example.ioc.pro5_ipc_import.other.Apple;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration // 配置类，相当于xml配置文件
@Import(value = {FruitImportSelector.class, Apple.class}) // 导入组件，id默认是组件的全类名

public class AppConfig_2 {
    @Bean
    public Banana b() {
        return new Banana();
    }

}
